package db.pojo;

import java.util.*;
import java.text.SimpleDateFormat;
import db.ext.EaroleauthorizeExt;
@SuppressWarnings("unchecked")
/**
 * earoleauthorize
 */
public class Earoleauthorize {
	/**
	 * AUTHORIZEID
	 */
	public String aUTHORIZEID;
	/**
	 * ROLEID
	 */
	public String rOLEID;
	/**
	 * MENUID
	 */
	public String mENUID;
	/**
	 * AUTHORIZELEVEL
	 */
	public String aUTHORIZELEVEL;
	SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	public static EaroleauthorizeExt DB = new EaroleauthorizeExt(); 
	
	public Earoleauthorize() {
		super();
	}
	
	public Earoleauthorize(String aUTHORIZEID, String rOLEID, String mENUID, String aUTHORIZELEVEL) {
		super();
		this.aUTHORIZEID = aUTHORIZEID; 
		this.rOLEID = rOLEID; 
		this.mENUID = mENUID; 
		this.aUTHORIZELEVEL = aUTHORIZELEVEL; 
	}
	
	public String getAUTHORIZEID() {
		return aUTHORIZEID;
	}

	public void setAUTHORIZEID(String aUTHORIZEID) {
		this.aUTHORIZEID = aUTHORIZEID;
	} 
	
	public String getROLEID() {
		return rOLEID;
	}

	public void setROLEID(String rOLEID) {
		this.rOLEID = rOLEID;
	} 
	
	public String getMENUID() {
		return mENUID;
	}

	public void setMENUID(String mENUID) {
		this.mENUID = mENUID;
	} 
	
	public String getAUTHORIZELEVEL() {
		return aUTHORIZELEVEL;
	}

	public void setAUTHORIZELEVEL(String aUTHORIZELEVEL) {
		this.aUTHORIZELEVEL = aUTHORIZELEVEL;
	} 
	
	
	public Map earoleauthorizeToMap() {
		Map map = new HashMap();
		try {
			map.put("aUTHORIZEID",this.aUTHORIZEID);
			map.put("rOLEID",this.rOLEID);
			map.put("mENUID",this.mENUID);
			map.put("aUTHORIZELEVEL",this.aUTHORIZELEVEL);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}

	public Earoleauthorize mapToEaroleauthorize(Map map){
		try {
			String aUTHORIZEID =  map.get("aUTHORIZEID").toString();
			String rOLEID =  map.get("rOLEID").toString();
			String mENUID =  map.get("mENUID").toString();
			String aUTHORIZELEVEL =  map.get("aUTHORIZELEVEL").toString();
			Earoleauthorize earoleauthorize = new Earoleauthorize(aUTHORIZEID, rOLEID, mENUID, aUTHORIZELEVEL);
			return earoleauthorize;
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
	} 
	
	public String toString(){
		return earoleauthorizeToMap().toString();
	}
	
	//方便数据操作	
	public Earoleauthorize insert(){
		return DB.insert(this);
	}
	public Earoleauthorize update(){
		return DB.update(this);
	}
	
	public int delete(){
		return DB.delete(this);
	}
	
}
